package org.bigdata.framework.core.protocol;

import java.util.List;

import org.bigdata.framework.core.model.Classes;
import org.bigdata.framework.core.model.CommonDataProperty;
import org.bigdata.framework.core.model.CommonObjectProperty;
import org.bigdata.framework.core.model.DataBackup;
import org.bigdata.framework.core.model.DataExport;
import org.bigdata.framework.core.model.DataImport;
import org.bigdata.framework.core.model.DataInterface;
import org.bigdata.framework.core.model.DataProperty;
import org.bigdata.framework.core.model.DataRecovery;
import org.bigdata.framework.core.model.DataSource;
import org.bigdata.framework.core.model.DataSubmit;
import org.bigdata.framework.core.model.DataType;
import org.bigdata.framework.core.model.Department;
import org.bigdata.framework.core.model.Dict;
import org.bigdata.framework.core.model.DictItem;
import org.bigdata.framework.core.model.Feedback;
import org.bigdata.framework.core.model.IndexingRules;
import org.bigdata.framework.core.model.IndexingWeights;
import org.bigdata.framework.core.model.Log;
import org.bigdata.framework.core.model.Member;
import org.bigdata.framework.core.model.MemberMessage;
import org.bigdata.framework.core.model.Menu;
import org.bigdata.framework.core.model.MenuButton;
import org.bigdata.framework.core.model.NlpSensitiveWord;
import org.bigdata.framework.core.model.NlpStopWord;
import org.bigdata.framework.core.model.ObjectProperty;
import org.bigdata.framework.core.model.OpenLogin;
import org.bigdata.framework.core.model.Payment;
import org.bigdata.framework.core.model.Permission;
import org.bigdata.framework.core.model.PermissionButton;
import org.bigdata.framework.core.model.PermissionClasses;
import org.bigdata.framework.core.model.RepositoryProduct;
import org.bigdata.framework.core.model.Role;
import org.bigdata.framework.core.model.SearchFavoriteCategory;
import org.bigdata.framework.core.model.SearchFavoriteResource;
import org.bigdata.framework.core.model.SearchHistory;
import org.bigdata.framework.core.model.SearchHotwords;
import org.bigdata.framework.core.model.SearchNotes;
import org.bigdata.framework.core.model.SearchSortRule;
import org.bigdata.framework.core.model.SearchSubscribe;
import org.bigdata.framework.core.model.SearchWeightCustoms;
import org.bigdata.framework.core.model.SearchWeightFields;
import org.bigdata.framework.core.model.ShardingDataSource;
import org.bigdata.framework.core.model.ShardingRepositoryCount;
import org.bigdata.framework.core.model.ShardingRepositoryDataSource;
import org.bigdata.framework.core.model.User;
import org.bigdata.framework.core.model.UserGroup;
import org.bigdata.framework.core.model.UserGroupRole;
import org.bigdata.framework.core.model.UserGroupUser;
import org.bigdata.framework.core.model.UserRole;

/**
 * 基础接口（写）
 * @author vimes
 *
 */
public interface IBaseService {

	/* 用户-机构-角色-权限管理模块 start */
	
	/* 用户管理 start */
	User saveUser(User user);
	User editUser(User user);
	void deleteUser(User user);
	/* 用户管理 end */
	
	/* 角色管理 start */
	Role saveRole(Role role);
	Role editRole(Role role);
	void deleteRole(Role role);
	/* 角色管理 end */
	
	/* 部门管理 start */
	Department saveDepartment(Department department);
	Department editDepartment(Department department);
	void deleteDepartment(Department department);
	/* 部门管理 end */
	
	/* 菜单管理 start */
	Menu saveMenu(Menu menu);
	Menu editMenu(Menu menu);
	void deleteMenu(Menu menu);
	/* 菜单管理 end */
	
	/* 按钮管理 start */
	MenuButton saveMenuButton(MenuButton menuButton);
	MenuButton editMenuButton(MenuButton menuButton);
	void deleteMenuButton(MenuButton menuButton);
	/* 按钮管理 end */
	
	/* 用户组管理 start */
	UserGroup saveUserGroup(UserGroup userGroup);
	UserGroup editUserGroup(UserGroup userGroup);
	void deleteUserGroup(UserGroup userGroup);
	/* 用户组管理 end */
	
	/* 用户组-角色管理 start */
	UserGroupRole saveUserGroupRole(UserGroupRole userGroupRole);
	UserGroupRole editUserGroup(UserGroupRole userGroupRole);
	void deleteUserGroupRole(UserGroupRole userGroupRole);
	/* 用户组-角色管理 end */
	
	/* 用户-角色管理 start */
	UserRole saveUserRole(UserRole userRole);
	UserRole editUserRole(UserRole userRole);
	void deleteUserRole(UserRole userRole);
	/* 用户-角色管理 end */
	
	/* 用户组-用户管理 start */
	UserGroupUser saveUserGroupUser(UserGroupUser userGroupUser);
	UserGroupUser editUserGroupUser(UserGroupUser userGroupUser);
	void deleteUserGroupUser(UserGroupUser userGroupUser);
	/* 用户组-用户管理 end */
	
	/* 权限管理 start */
	Permission savePermission(Permission permission);
	Permission editPermission(Permission permission);
	void deletePermission(Permission permission);
	/* 权限管理 end */
	
	/* 权限-按钮管理 start */
	PermissionButton savePermissionButton(PermissionButton permissionButton);
	PermissionButton editPermissionButton(PermissionButton permissionButton);
	void deletePermissionButton(PermissionButton permissionButton);
	/* 权限-按钮管理 end */
	
	/* 知识库权限管理 start */
	PermissionClasses savePermissionClasses(PermissionClasses permissionClasses);
	PermissionClasses editPermissionClasses(PermissionClasses permissionClasses);
	void deletePermissionClasses(PermissionClasses permissionClasses);
	/* 知识库权限管理 end */
	
	/* 用户-机构-角色-权限管理模块 end */

	/* 数据类型管理 start */
	DataType saveDataType(DataType dataType);
	DataType editDataType(DataType dataType);
	void deleteDataType(DataType dataType);
	/* 数据类型管理 end */
	
	/* 字典类管理 start */
	Dict saveDict(Dict dict);
	Dict editDict(Dict dict);
	void deleteDict(Dict dict);
	/* 字典类管理 end */
	
	/* 字典项管理 start */
	DictItem saveDictItem(DictItem dictItem);
	DictItem editDictItem(DictItem dictItem);
	void deleteDictItem(DictItem dictItem);
	/* 字典项管理 end */
	
	/* 公用数据属性管理 start */
	CommonDataProperty saveCommonDataProperty(CommonDataProperty commonDataProperty);
	CommonDataProperty editCommonDataProperty(CommonDataProperty commonDataProperty);
	void deleteCommonDataProperty(CommonDataProperty commonDataProperty);
	/* 公用数据属性管理 end */
	
	/* 公用对象属性管理 start */
	CommonObjectProperty saveCommonObjectProperty(CommonObjectProperty commonObjectProperty);
	CommonObjectProperty editCommonObjectProperty(CommonObjectProperty commonObjectProperty);
	void deleteCommonObjectProperty(CommonObjectProperty commonObjectProperty);
	/* 公用对象属性管理 end */ 
	
	/* 类管理 start */
	Classes saveClasses(Classes classes);
	Classes editClasses(Classes classes);
	void deleteClasses(Classes classes);
	/* 类管理 end */
	
	/* 类-数据管理 start */
	DataProperty saveDataProperty(DataProperty dataProperty);
	DataProperty editDataProperty(DataProperty dataProperty);
	void deleteDataProperty(DataProperty dataProperty);
	/* 类-数据管理 end */
	
	/* 类-对象管理 start */
	ObjectProperty saveObjectProperty(ObjectProperty objectProperty);
	ObjectProperty editObjectProperty(ObjectProperty objectProperty);
	void deleteObjectProperty(ObjectProperty objectProperty);
	/* 类-对象管理 end */
	
	/* 数据管理 start */
	
	/* 数据源管理 start */
	DataSource saveDataSource(DataSource dataSource);
	DataSource editDataSource(DataSource dataSource);
	void deleteDataSource(DataSource dataSource);
	/* 数据源管理 end */
	
	/* 数据导入管理 start */
	DataImport saveDataImport(DataImport dataImport);
	DataImport editDataImport(DataImport dataImport);
	void deleteDataImport(DataImport dataImport);
	/* 数据导入管理 end */
	
	/* 数据导出管理 start */
	DataExport saveDataExport(DataExport dataExport);
	DataExport editDataExport(DataExport dataExport);
	void deleteDataExport(DataExport dataExport);
	/* 数据导出管理 end */
	
	/* 数据接口管理 start */
	DataInterface saveDataInterface(DataInterface dataInterface);
	DataInterface editDataInterface(DataInterface dataInterface);
	void deleteDataInterface(DataInterface dataInterface);
	/* 数据接口管理 end */
	
	/* 数据发布管理 start */
	DataSubmit saveDataSubmit(DataSubmit dataSubmit);
	DataSubmit editDataSubmit(DataSubmit dataSubmit);
	void deleteDataSubmit(DataSubmit dataSubmit);
	/* 数据发布管理 end */
	
	/* 日志管理 start */
	Log saveLog(Log log);
	Log editLog(Log log);
	void deleteLog(Log log);
	/* 日志管理 end */
	
	/* 数据管理 end */
	
	/** 知识应用管理功能区域 start **/
	 
	/* 会员管理（包括个人用户、机构用户、机构下的个人） start */
	Member saveMember(Member member);
	Member editMember(Member member);
	void deleteMember(Member member);
	/* 会员管理（包括个人用户、机构用户、机构下的个人）  end */
	
	/* 第三方登录管理 start */
	OpenLogin saveOpenLogin(OpenLogin openLogin);
	OpenLogin editOpenLogin(OpenLogin openLogin);
	void deleteOpenLogin(OpenLogin openLogin);
	/* 第三方登录管理 end */
	
	/* 支付方式管理 start */
	Payment savePayment(Payment payment);
	Payment editPayment(Payment payment);
	void deletePayment(Payment payment);
	/* 支付方式管理 end */
	
	/* 产品管理 start */
	RepositoryProduct saveRepositoryProduct(RepositoryProduct repositoryProduct);
	RepositoryProduct editRepositoryProduct(RepositoryProduct repositoryProduct);
	void deleteRepositoryProduct(RepositoryProduct repositoryProduct);
	/* 产品管理 end */
	
	/** 知识应用管理功能区域 end **/
	
	/** 统一检索管理功能区域 start **/
	/* 热搜词 start */
	SearchHotwords saveSearchHotwords(SearchHotwords searchHotwords);
	SearchHotwords editSearchHotwords(SearchHotwords searchHotwords);
	void deleteSearchHotwords(SearchHotwords searchHotwords);
	/* 热搜词 end */
	
	/* 排序 start */
	SearchSortRule saveSearchSortRule(SearchSortRule searchSortRule);
	SearchSortRule editSearchSortRule(SearchSortRule searchSortRule);
	void deleteSearchSortRule(SearchSortRule searchSortRule);
	/* 排序 end */
	
	/* 自定义权重 start */
	SearchWeightCustoms saveSearchWeightCustoms(SearchWeightCustoms searchWeightCustoms);
	SearchWeightCustoms editSearchWeightCustoms(SearchWeightCustoms searchWeightCustoms);
	void deleteSearchWeightCustoms(SearchWeightCustoms searchWeightCustoms);
	/* 自定义权重 end */
	
	/* 字段权重 start */
	SearchWeightFields saveSearchWeightFields(SearchWeightFields searchWeightFields);
	SearchWeightFields editSearchWeightFields(SearchWeightFields searchWeightFields);
	void deleteSearchWeightFields(SearchWeightFields searchWeightFields);
	/* 字段权重 end */
	
	/** 统一检索管理功能区域 end **/
	
	/** 检索历史start **/
	SearchHistory saveSearchHistory(SearchHistory searchHistory);
	void deleteSearchHistory(SearchHistory searchHistory);
	void deleteSearchHistorys(List<Integer> ids);
	/** 检索历史end **/
	
	/** pdf标记 **/
	SearchNotes saveSearchNotes(SearchNotes searchNotes);
	SearchNotes editSearchNotes(SearchNotes searchNotes);
	void deleteSearchNotes(SearchNotes SearchNotes);
	
	/* api 权重配置 start */
	IndexingWeights saveIndexingWeights(IndexingWeights indexingWeights);
	IndexingWeights editIndexingWeights(IndexingWeights indexingWeights);
	void deleteIndexingWeights(IndexingWeights indexingWeights);
	/* api 权重配置 end */
	/* api 标引规则列表 start */
	IndexingRules saveIndexingRules(IndexingRules indexingRules);
	IndexingRules editIndexingRules(IndexingRules indexingRules);
	void deleteIndexingRules(IndexingRules indexingRules);
	/* api 标引规则列表  end */
	
	/* 敏感词字段 start */
	NlpSensitiveWord saveNlpSensitiveWord(NlpSensitiveWord nlpSensitiveWord);
	NlpSensitiveWord editNlpSensitiveWord(NlpSensitiveWord nlpSensitiveWord);
	void deleteNlpSensitiveWord(NlpSensitiveWord nlpSensitiveWord);
	/* 敏感词字段 end */
	
	/* 禁用词字段 start */
	NlpStopWord saveNlpStopWord(NlpStopWord nlpStopWord);
	NlpStopWord editNlpStopWord(NlpStopWord nlpStopWord);
	void deleteNlpStopWord(NlpStopWord nlpStopWord);
	/* 禁用词字段 end */
	
	/* 订阅管理 start */
	SearchSubscribe saveSearchSubscribe(SearchSubscribe searchSubscribe);
	SearchSubscribe editSearchSubscribe(SearchSubscribe searchSubscribe);
	void deleteSearchSubscribe(SearchSubscribe searchSubscribe);
	/* 订阅管理 end */
	
	/* 知识库备份 start */
	DataBackup saveDataBackup(DataBackup dataBackup);
	DataBackup editDataBackup(DataBackup dataBackup);
	void deleteDataBackup(DataBackup dataBackup);
	/* 知识库备份 end */
	
	/* 知识库恢复 start */
	DataRecovery saveDataRecovery(DataRecovery dataRecovery);
	DataRecovery editDataRecovery(DataRecovery dataRecovery);
	void deleteDataRecovery(DataRecovery dataRecovery);
	/* 知识库恢复 end */
	
	/* 分库分表-数据源管理 start */
	ShardingDataSource saveShardingDataSource(ShardingDataSource shardingDataSource);
	ShardingDataSource editShardingDataSource(ShardingDataSource shardingDataSource);
	void deleteShardingDataSource(ShardingDataSource shardingDataSource);
	/* 分库分表-数据源管理 end */
	
	/* 分库分表-知识库数据源管理 start */
	ShardingRepositoryDataSource saveShardingRepositoryDataSource(ShardingRepositoryDataSource shardingRepositoryDataSource);
	ShardingRepositoryDataSource editShardingRepositoryDataSource(ShardingRepositoryDataSource shardingRepositoryDataSource);
	void deleteShardingRepositoryDataSource(ShardingRepositoryDataSource shardingRepositoryDataSource);
	/* 分库分表-知识库数据源管理 end */
	
	/* 分库分表-知识库记录数 start */
	ShardingRepositoryCount saveShardingRepositoryCount(ShardingRepositoryCount shardingRepositoryCount);
	ShardingRepositoryCount editShardingRepositoryCount(ShardingRepositoryCount shardingRepositoryCount);
	void deleteShardingRepositoryCount(ShardingRepositoryCount shardingRepositoryCount);
	/* 分库分表-知识库记录数 end */
	
	/* 站内消息表 start */
	MemberMessage saveMemberMessage(MemberMessage memberMessage);
	MemberMessage editMemberMessage(MemberMessage memberMessage);
	void deleteMemberMessage(MemberMessage memberMessage);
	/* 站内消息表 end */
	
	/* 收藏分类表 start */
	SearchFavoriteCategory saveSearchFavoriteCategory(SearchFavoriteCategory searchFavoriteCategory);
	SearchFavoriteCategory editSearchFavoriteCategory(SearchFavoriteCategory searchFavoriteCategory);
	void deleteSearchFavoriteCategory(SearchFavoriteCategory searchFavoriteCategory);
	/* 收藏分类表 end */
	
	/* 收藏资源表 start */
	SearchFavoriteResource saveSearchFavoriteResource(SearchFavoriteResource searchFavoriteResource);
	SearchFavoriteResource editSearchFavoriteResource(SearchFavoriteResource searchFavoriteResource);
	void deleteSearchFavoriteResource(SearchFavoriteResource searchFavoriteResource);
	/* 收藏资源表 end */
	
	/* 意见反馈 start */
	Feedback saveFeedback(Feedback feedback);
	Feedback editFeedback(Feedback feedback);
	void deleteFeedback(Feedback feedback);
	/* 意见反馈 end */
}
